#ifndef SETTINGS_H
#define SETTINGS_H

#include "stdafx.hpp"
#include "grid.hpp"

namespace settings
{
	
	//Functions

	extern void set_options(int argc, char* argv[]);
	extern void cleanup();
	extern void change_mode_path(unsigned  int mode);
	extern void check_parameters();

	//Some paths

	extern std::string output_dir;
	extern std::string bitmap_path;
	extern std::string TEbound_path;

	//Variables and flags accessible through program options

	extern long double dt;
	extern unsigned int n;
	extern int load_mode;
	extern unsigned int mode;
	extern unsigned int nthreads;
	extern unsigned long int sub_period;
	extern unsigned long int norm_period;
    extern std::string mrindex;
    extern std::string mrfreq_path;
    extern std::string Kd_key_path;
	extern bool TEmode;    extern bool frequency;
	extern bool TMmode;    extern bool check;
	extern bool TEbound;   extern bool extended_check;
	extern bool boundary;  extern bool multirun_frequency;
	extern bool ffactor;   extern bool qfactor;
	extern bool wait;

	//Exceptions

	class no_input_file;
	class no_setting;
	class bad_setting;

	//etc.

	extern std::map<std::string,std::string> usr_opt;
	enum { RESULT, BOUNDARY, FREQUENCY, CHECK_RATIO, CHECK_ACTUAL, CHECK_EXPECTED, QFACTOR, MR_FREQ };
	extern std::vector<std::string> paths;
	extern std::map<color,grid::data_type> colors;
    extern const color ignored_color;
}

#endif // SETTINGS_H

